.dashboard.password
    sidebar(user='data.user' href-base='/dashboard/index')
    #content-wrapper
        .col-md-12
            br
            form.form-horizontal(name='password_form' novalidate  ng-submit="password.submit()" role="form")
                fieldset.form-inner
                    .form-group(ng-class="{ 'has-error' : ( invalid_password(password.password_old) || password_form.password_old.$invalid) && !password_form.password_old.$pristine }")
                        .col-sm-1.control-label 原密码
                        .col-sm-6
                            input.form-control(required placeholder="{{PASSWORD_MIN}}~{{PASSWORD_MAX}}位字母或数字且不能全为数字或字母" type="password" name="password_old" ng-model="password.password_old" ng-minlength="PASSWORD_MIN" ng-maxlength="PASSWORD_MAX")
                            .help-block(ng-show="(invalid_password(password.password_old) || password_form.password_old.$invalid) && !password_form.password_old.$pristine") {{PASSWORD_MIN}}~{{PASSWORD_MAX}}位字母或数字且不能全为数字或字母
                    .form-group(ng-class="{ 'has-error' : (invalid_password(password.password_new) || (password.password_old == password.password_new) || password_form.password_new.$invalid) && !password_form.password_new.$pristine }")
                        .col-sm-1.control-label 新密码
                        .col-sm-6
                            input.form-control(required placeholder="{{PASSWORD_MIN}}~{{PASSWORD_MAX}}位字母或数字且不能全为数字或字母，且不能与原密码相同" type="password" name="password_new" ng-model="password.password_new" ng-minlength="PASSWORD_MIN" ng-maxlength="PASSWORD_MAX")
                            .help-block(ng-show="(invalid_password(password.password_new) || password_form.password_new.$invalid) && !password_form.password_new.$pristine") {{PASSWORD_MIN}}~{{PASSWORD_MAX}}位字母或数字且不能全为数字或字母
                            .help-block(ng-show="password.password_old == password.password_new && !password_form.password_new.$pristine") 新密码不能与原密码相同
                    .form-group(ng-class="{ 'has-error' : (password.password_new != password.password_confirmation) && !password_form.password_confirmation.$pristine }")
                        .col-sm-1.control-label 确认密码
                        .col-sm-6
                            input.form-control(required placeholder="确认密码" type="password" name="password_confirmation" ng-model="password.password_confirmation" ng-minlength="PASSWORD_MIN" ng-maxlength="PASSWORD_MAX")
                            .help-block(ng-show="(password.password_new != password.password_confirmation) && !password_form.password_confirmation.$pristine") 两次密码不同
                    

                    .form-actions.form-group(ng-class="{'has-success':!password.submit_error, 'has-error':password.submit_error}")
                        .col-sm-1
                        .col-sm-6
                            button.btn.btn-danger.full_width(type='submit' ng-disabled='invalid_password(password.password_confirmation) || invalid_password(password.password_new)  || password_form.password_new.$invalid || password_form.password_confirmation.$invalid|| password.password_old == password.password_new || (password.password_new != password.password_confirmation)' ng-init="password.btn_info='修改密码'") {{password.btn_info}}
                            .help-block.has-success(ng-show="password.submit_info" ng-repeat="info in password.submit_info") {{info}}
                            br